import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

import net.techest.httpproxy.*;


public class DailyTask 
{
	public static void main(String[] args) throws IOException
	{
		/* 算S1码农群号
		long start = System.currentTimeMillis();
		int target = 4263116;
		int index = 0;
		int prime = 0;
		int max = (int) (target > 50?(1.2 * target * Math.log(target)):300);
		boolean p [] = new boolean[max]; 
		
		for (int slot = 2; index < target && slot < max; slot++)
		{
			if (!p[slot])
			{
				for (int seek = slot + slot; seek < max; seek += slot)
				{
					p[seek] = true;
				}
				index++;
				prime = slot;
			}
		}
		System.out.println(String.format("Prime %d : %d, cost: %dms", target, prime, System.currentTimeMillis() - start));
		*/ 
		
		HTTPProxyServer proxy = new HTTPProxyServer(8999);
		proxy.run();
	}
}


